﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
using System.Xml.Xsl;
using System.Xml.XPath;

namespace WebService1
{
    public class FormatXml
    {
        public static void Format()
        {
            try {
                //
                XPathDocument inputSource = new XPathDocument("../salary.xml");
                //
                XslTransform xslt = new XslTransform();
                //
                xslt.Load("../formatXml.xsl");
                //
                XmlTextWriter myWriter = new XmlTextWriter("result.xml", null);
                //
                xslt.Transform(inputSource, null, myWriter);
                //
                myWriter.Close();
            }
            catch (Exception e)
            {
                
            } 

        }
    }
}
